﻿@model NOSDC.Areas.Admin.Models.ArticleViewModel
@{
    ViewBag.Title = "Create";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/ckeditor/ckeditor.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Post a new article</legend>
        <div style="padding-bottom: 20px;">
            <div style="float: left; padding-right: 20px;">
                <div class="editor-label">
                    <strong>@Html.LabelFor(model => model.Article.Title)</strong>
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.Article.Title, new { style = "width:400px;" })
                    @Html.ValidationMessageFor(model => model.Article.Title)
                </div>
            </div>
            <div style="float: left;">
                <div class="editor-label">
                    <strong>Status</strong>
                </div>
                <div class="editor-field">
                    @Html.DropDownListFor(model => model.Article.StatusID, Model.StatusValues, new { style = "width:200px;" })
                </div>
            </div>
        </div>
        <br />
        <br />
        <div class="editor-label" style="clear: both;">
            <strong>@Html.LabelFor(model => model.Article.Story)</strong> * <span style="color: green; font-style: italic; text-decoration: underline;">
            Be careful adding HTML to the page. Make sure you check the front page to ensure that your html did not break it.</span>
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Article.Story, new { @class = "ckeditor", style = "width:620px;height:150px;", id = "editor1", name="Story" })
            @Html.ValidationMessageFor(model => model.Article.Story)
        </div>
        <div>
            <div class="editor-label" style="float: left; padding-right: 20px;">
                <strong>Date Posted:</strong> @Html.DisplayFor(model => model.Article.DatePosted)
            </div>
            <div class="editor-label" style="float: left;">
                <strong>Posted By:</strong> @Membership.GetUser().UserName
            </div>
        </div>
        <br />
        <br />
        <p>
            <input type="submit" value="Create Article" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
